#include<stdio.h>
#include<sys/types.h>
#include<sys/stat.h>
#include<fcntl.h>
#include<string.h>
int main(){
  int fd=open("bite",O_WRONLY|O_CREAT|O_TRUNC,0666);
  char* mage="i like linux\n";
  int wsz=write(fd,mage,strlen(mage));
  char buff[1024];
  close(fd);
  int fd2=open("bite",O_RDONLY);
  //write(1,mage,strlen(mage));
  int rsz=read(fd2,buff,sizeof(buff));
  
  write(1,buff,strlen(buff));

 // printf("wsz:%d rsz:%d\n",wsz,rsz);
  close(fd2);
  return 0;
}
